using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_ssearchesMap : EntityTypeConfiguration<so_ssearches>
    {
        public so_ssearchesMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Title)
                .HasMaxLength(50);

            this.Property(t => t.View)
                .HasMaxLength(50);

            this.Property(t => t.Category)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("so_ssearches");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.View).HasColumnName("View");
            this.Property(t => t.Grouping).HasColumnName("Grouping");
            this.Property(t => t.Category).HasColumnName("Category");
        }
    }
}
